package cn.crm.bean;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Product entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "PD_PRODUCTS")
public class Product implements java.io.Serializable {

	// Fields

	private String pdProductid;
	private DDL DDLByTypeNorm;
	private DDL DDLByTypeUnit;
	private String pdProductname;
	private String pdOther;
	private Double pdPrice;
	private Integer pdAllcount;
	private boolean pdIsdelete;

	// Constructors

	/** default constructor */
	public Product() {
	}

	/** minimal constructor */
	public Product(String pdProductid) {
		this.pdProductid = pdProductid;
	}

	/** full constructor */
	public Product(String pdProductid, DDL DDLByTypeNorm, DDL DDLByTypeUnit,
			String pdProductname, String pdOther, Double pdPrice,
			Integer pdAllcount) {
		this.pdProductid = pdProductid;
		this.DDLByTypeNorm = DDLByTypeNorm;
		this.DDLByTypeUnit = DDLByTypeUnit;
		this.pdProductname = pdProductname;
		this.pdOther = pdOther;
		this.pdPrice = pdPrice;
		this.pdAllcount = pdAllcount;
	}

	// Property accessors
	@Id
	@Column(name = "PD_PRODUCTID", unique = true, nullable = false, length = 36)
	public String getPdProductid() {
		return this.pdProductid;
	}

	public void setPdProductid(String pdProductid) {
		this.pdProductid = pdProductid;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "TYPE_NORM")
	public DDL getDDLByTypeNorm() {
		return this.DDLByTypeNorm;
	}

	public void setDDLByTypeNorm(DDL DDLByTypeNorm) {
		this.DDLByTypeNorm = DDLByTypeNorm;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "TYPE_UNIT")
	public DDL getDDLByTypeUnit() {
		return this.DDLByTypeUnit;
	}

	public void setDDLByTypeUnit(DDL DDLByTypeUnit) {
		this.DDLByTypeUnit = DDLByTypeUnit;
	}

	@Column(name = "PD_PRODUCTNAME", length = 15)
	public String getPdProductname() {
		return this.pdProductname;
	}

	public void setPdProductname(String pdProductname) {
		this.pdProductname = pdProductname;
	}

	@Column(name = "PD_OTHER", length = 50)
	public String getPdOther() {
		return this.pdOther;
	}

	public void setPdOther(String pdOther) {
		this.pdOther = pdOther;
	}

	@Column(name = "PD_PRICE", precision = 8)
	public Double getPdPrice() {
		return this.pdPrice;
	}

	public void setPdPrice(Double pdPrice) {
		this.pdPrice = pdPrice;
	}

	@Column(name = "PD_ALLCOUNT", precision = 8, scale = 0)
	public Integer getPdAllcount() {
		return this.pdAllcount;
	}

	public void setPdAllcount(Integer pdAllcount) {
		this.pdAllcount = pdAllcount;
	}

	@Column(name = "PD_ISDELETE", precision = 1, scale = 0)
	public boolean isPdIsdelete() {
		return pdIsdelete;
	}

	public void setPdIsdelete(boolean pdIsdelete) {
		this.pdIsdelete = pdIsdelete;
	}

	
}